const util={
    ChangeRead : (num) =>{
        var res = "" ; 
        if(num>=0 && num < 1000){
            res = num ;
        }
        if(num >=1000 && num < 10000){
           res =  (num / 1000).toFixed(1)+"k"
        }
        if(num>=10000){
            res = (num / 10000).toFixed(1)+"w"
        }
        return res ;
    },

    ChangeTime : time=>{
        var data  = new Date(time);
        var opt = {
            year: 'numeric', 
            month: 'long',
            day: 'numeric'
        }
       return data.toLocaleDateString(opt);
    }

}

module.exports = util ;